import { ref, reactive, computed } from "vue";
import { useTypeStore } from "@/store/type";


export default function useMenuModel(type?: string) {
  const typeStore = useTypeStore()
  const modules = reactive({
    model: [
      { title: '截取屏幕的一部分生成图片', description: '截取屏幕的一部分生成图片', url: "/snipasteToPng", },
      { title: '图片的拖拉拽', description: '对图片或文字进行拖拉拽及缩放', url: "/dragPic", },
      { title: '文件的预览与下载', description: '常见文件的线上线下预览与下载', url: "/filePreview", },
      { title: '表格拖拽', description: '对表格进行拖拽排序', url: "/dragTable", },
      { title: '图片预览', description: '对图片进行预览', url: "/imgPreview", },
    ],
    knowledge: [
      { title: 'vue文档基础', description: 'vue文档中基础部分', url: "/vueBase", },
    ],
    function: [
      { title: '常用工具函数', description: '常用工具函数', url: "/commonUtils", },
      { title: '✨合并行与列', description: '将表格中相同值的行列合并', url: "/mergeRowOrColumn",},
      { title: '加密解密', description: '对特殊数据进行加密解密处理', url: "/encrypt",},
    ],
    frame: [
      { title: '✨文字提示', description: '✨文字片段截取', url: "/reText", },
      { title: '二维码', description: '二维码', url: "/qrcode", },
      { title: '✨聊天输入框', description: '✨聊天输入框', url: "/chat", },
      { title: '✨大屏适配scale', description: '✨大屏适配scale', url: "/screen", },
      { title: '国际化', description: 'I18n实现国际化', url: "/i18n", },
      { title: '富文本', description: '富文本编辑器Tinymce', url: "/rich", },
      { title: '瀑布流', description: '手动实现瀑布流', url: "/waterfall", },
    ],
    performance: [
      { title: '虚拟列表', description: '用来渲染海量数据', url: "/virtualList", },
    ],
    expand: [
      { title: "动画交互", description: "动画交互", url: "/interaction" },
      { title: "禁止调试", description: "禁止调试", url: "/banDebugging" },
      {
        title: "首页-Tyz（开发中ing...）",
        description: "首页-Tyz（开发中ing...）",
        url: "/TyzHomeView",
        disabled: true,
      },
      { title: "数字雨", description: "数字雨", url: "/numberRain" },
    ]
  })

  const menuList = computed(() => {
    return modules[typeStore.activeName]
  })

  return {
    menuList
  }
}